<?php
	include 'token.php'; //取得token
	include 'instance_quantity.php'; //取得主機數量

	//取得instance

	$url="http://120.96.183.123:8777/v2/meters/instance?limit=$instance_number";
	//開啟cURL連線
	$cURL = curl_init();
	curl_setopt($cURL, CURLOPT_URL, $url);			
	curl_setopt($cURL, CURLOPT_CUSTOMREQUEST, "GET");
	curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
		'Content-Type: application/json',
		'Accept: application/json',
		'X-Auth-Token:'.$token
	));				
	$instance_detail = curl_exec($cURL);
	curl_close($cURL);	

	echo $instance_detail;

?>